<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--
    使用动态添加的方式创建水果对象 其中包含水果名称、重量 并实现数据的访问
-->

<script>

    var fruit = {}
    fruit.name = 'apple'
    fruit.weight = '300g'

    console.log(fruit.name);
    console.log(fruit.weight);

</script>
</body>
</html>